<template>
  <div class="comp">
    <table v-show="list && list.length > 0" class="table table-bordered table-hover">
      <caption>欢迎语/无结果引导语</caption>
      <thead>
        <tr>
          <th class="col-xs-6">文字</th>
          <th class="col-xs-2">类别</th>
          <th class="col-nowrap">关联问题ID</th>
          <th></th>
        </tr>
      </thead>
      <tbody>
        <tr v-for="it in list">
          <td>{{it.word}}</td>
          <td>{{+it.type === 1 ? '欢迎语' : '无结果引导语'}}</td>
          <td>{{it.questionIds}}</td>
          <td class="col-nowrap text-right">
            <button class="btn btn-sm btn-danger" @click="deleteItem(it.id)">删除</button>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</template>
<script src="./guide-list.js"></script>